set(SERIALIZER_TARGET darknet-serializer)

FILE(GLOB_RECURSE DARKNET_SRCS "*.cpp")

ADD_LIBRARY(${SERIALIZER_TARGET} SHARED ${DARKNET_SRCS}) 

target_link_libraries(${SERIALIZER_TARGET} ${TENGINE_LIBRARY} )

SET_TARGET_PROPERTIES(${SERIALIZER_TARGET} PROPERTIES VERSION ${SERIALIZER_VERSION} SOVERSION ${SERIALIZER_SO_VERSION})

install(TARGETS ${SERIALIZER_TARGET} DESTINATION lib)

#below is for static library

ADD_LIBRARY(${SERIALIZER_TARGET}-static STATIC ${DARKNET_SRCS})
SET_TARGET_PROPERTIES(${SERIALIZER_TARGET}-static PROPERTIES OUTPUT_NAME  ${SERIALIZER_TARGET})

ADD_DEPENDENCIES(${SERIALIZER_TARGET} ${SERIALIZER_TARGET}-static)

install(TARGETS ${SERIALIZER_TARGET}-static DESTINATION lib)
